package com.baba.vote.dto.request;

import com.baba.vote.pojo.VotePeople;
import com.baba.vote.util.JsonUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author moxinHuoHuo
 * @create 2020/4/7 下午10:38
 */
@Data
public class VotePeopleBo {

  @ApiModelProperty("手机唯一标识符")
  private String uid;

  @ApiModelProperty("投票人名字")
  private String name;

  @ApiModelProperty("投票人的经度")
  private Double longitude;

  @ApiModelProperty("投票人的纬度")
  private Double latitude;

  public VotePeople doForward(Integer voteItemId, Integer voteActId) {
    VotePeople votePeople = new VotePeople();
    votePeople.setUid(uid);
    votePeople.setName(name);
    votePeople.setSupportVotingId(voteItemId);
    votePeople.setLongitude(longitude);
    votePeople.setLatitude(latitude);
    votePeople.setVoteActId(voteActId);

    return votePeople;
  }


  public static void main(String[] args) {
    VotePeopleBo votePeopleBo = new VotePeopleBo();
    votePeopleBo.setUid("");
    votePeopleBo.setName("");
    votePeopleBo.setLongitude(0.0D);
    votePeopleBo.setLatitude(0.0D);

    System.out.println(JsonUtil.obj2String(votePeopleBo));
  }
}
